<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .circular {
      height: 22px;
      width: 22px;
      animation: loading-rotate 2s linear infinite;
    }

    .circular .path {
      animation: loading-dash 1.5s ease-in-out infinite;
      stroke-dasharray: 90, 150;
      stroke-dashoffset: 0;
      stroke-width: 4;
      stroke: #409eff;
      stroke-linecap: round
    }

    @keyframes loading-rotate {
      to {
        transform: rotate(1turn)
      }
    }

    @keyframes loading-dash {
      0% {
        stroke-dasharray: 1, 200;
        stroke-dashoffset: 0
      }
      50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -40px
      }
      to {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -120px
      }
    }
  </style>
</head>

<body>
  <svg viewBox="25 25 50 50" class="circular">
    <circle cx="50" cy="50" r="20" fill="none" class="path"></circle>
  </svg>
</body>

</html>